﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using KiWing.CustomAttribute;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace webapi;

[Serializable]
[KiWing.CustomAttribute.TableAttribute("LotteryPerson", "Identifier")]
public class LotteryPerson
{

    [Field("Identifier", "ID")]
    public int Identifier { get; set; }

    [Field("FullName", "参与者姓名")]
    public String FullName { get; set; }

    [Field("Avatar", "头像图片")]
    public String Avatar { get; set; }

    [Field("Phone", "电话号码")]
    public String Phone { get; set; }

    [Field("IsParticipator", "是否参与 默认是不参与=2 参与=1")]
    public int IsParticipator { get; set; }

    [Field("AddDate", "添加时间")]
    [Newtonsoft.Json.JsonConverter(typeof(IsoDateTimeConverter))]
    public DateTime AddDate { get; set; }

    [Field("AddUser", "添加用户")]
    public String AddUser { get; set; }

    [Field("SignInTime", "签到时间")]
    [Newtonsoft.Json.JsonConverter(typeof(IsoDateTimeConverter))]
    public DateTime SignInTime { get; set; }


    public LotteryPerson()
    { }

    public LotteryPerson(int identifier, String fullname, String avatar, String phone, int isparticipator, DateTime adddate, String adduser, DateTime signintime)
    {

        this.Identifier = identifier;

        this.FullName = fullname;

        this.Avatar = avatar;

        this.Phone = phone;

        this.IsParticipator = isparticipator;

        this.AddDate = adddate;

        this.AddUser = adduser;

        this.SignInTime = signintime;

    }
}
